for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import { setBlockType } from 'prosemirror-commands';
import AbstractMenuItemDispatcher from './AbstractMenuItemDispatcher';
import MenuItem from '../MenuItem';
import { svgIcon } from '../MDI';
export default class ParagraphMenuItemDispatcher extends AbstractMenuItemDispatcher {
static isAvailable(schema) {
return !!schema.nodes.paragraph;
}
static getMenuItem(schema) {
if (!this.isAvailable(schema)) {
throw new Error('Paragraph not availabe in Schema!');
return new MenuItem({
command: setBlockType(schema.nodes.paragraph),
icon: svgIcon('format-paragraph'),
label: LANG.plugins.prosemirror['label:paragraph'],
LANG
/** global: LANG */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
});
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.